<?php

namespace App\Http\Requests\API;

use App\Models\Channel;
use InfyOm\Generator\Request\APIRequest;

class UpdateChannelAPIRequest extends APIRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'required_without_all:short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty|between:2,50',
            'short_name' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty|between:2,50',
            'logo' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty',
            'phone' => 'required_without_all:name,short_name,logo,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty',
            'email' => 'required_without_all:name,short_name,logo,phone,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty|email',
            'regtime' => 'required_without_all:name,short_name,logo,phone,email,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty|date',
            'introduction' => 'required_without_all:name,short_name,logo,phone,email,regtime,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty',
            'official_account' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty',
            'official_account_qrcode' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty',
            'web_url' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,province,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty|url',
            'province' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,city,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty',
            'city' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,address,linkman_name,linkman_phone,linkman_wechat,linkman_duty',
            'address' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,linkman_name,linkman_phone,linkman_wechat,linkman_duty',
            'linkman_name' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_phone,linkman_wechat,linkman_duty|between:1,20',
            'linkman_phone' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_wechat,linkman_duty',
            'linkman_wechat' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_duty',
            'linkman_duty' => 'required_without_all:name,short_name,logo,phone,email,regtime,introduction,official_account,official_account_qrcode,web_url,province,city,address,linkman_name,linkman_phone,linkman_wechat|between:1,30',
        ];
    }
}